﻿using System;
using System.Diagnostics;
using System.Web;

namespace Fuse8.DomainFramework.Common.Logging
{
    /// <summary>
    /// 
    /// </summary>
    public class TraceLogging : ILogging
    {
        #region ILogging Members

        /// <summary>
        /// 
        /// </summary>
        /// <param name="category"></param>
        /// <param name="message"></param>
        public void Log(string category, string message)
        {
            Trace.WriteLine(message, category);
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="message"></param>
        /// <param name="ex"></param>
        /// <returns></returns>
        public string LogError(string message, Exception ex)
        {
            Trace.TraceError(message);

            return string.Empty;
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="message"></param>
        /// <param name="errorDetails"></param>
        /// <returns></returns>
        public string LogError(string message, string errorDetails)
        {
            Trace.TraceError(errorDetails);

            return string.Empty;
        }

        #endregion
    }
}
